/*******************************************************************************
 * Size: 32 px
 * Bpp: 1
 * Opts: 
 ******************************************************************************/

#ifdef LV_LVGL_H_INCLUDE_SIMPLE
#include "lvgl.h"
#else
#include "lvgl/lvgl.h"
#endif

#ifndef LV_CUSTOM_ICON
#define LV_CUSTOM_ICON 1
#endif

#if LV_CUSTOM_ICON

/*-----------------
 *    BITMAPS
 *----------------*/

/*Store the image of the glyphs*/
static LV_ATTRIBUTE_LARGE_CONST const uint8_t glyph_bitmap[] = {
    /* U+E611 "" */
    0x3, 0xf0, 0xf, 0xc0, 0xf, 0xfc, 0x3f, 0xf0,
    0x1c, 0xe, 0x78, 0x38, 0x38, 0x7, 0xe0, 0x1c,
    0x71, 0xf3, 0xc7, 0x8e, 0x66, 0x19, 0x98, 0x66,
    0xc4, 0xd, 0xb0, 0x3, 0xc8, 0x4, 0x20, 0x3,
    0xc8, 0x0, 0x0, 0x13, 0xc8, 0x0, 0x0, 0x13,
    0xc8, 0x0, 0x0, 0x13, 0xcc, 0x0, 0x0, 0x23,
    0x64, 0x0, 0x0, 0x26, 0x62, 0x0, 0x0, 0x46,
    0x33, 0x0, 0x0, 0xcc, 0x39, 0x80, 0x1, 0x9c,
    0x1c, 0xc0, 0x3, 0x38, 0xe, 0x60, 0x6, 0x70,
    0x7, 0x30, 0xc, 0xe0, 0x3, 0x98, 0x19, 0xc0,
    0x1, 0xcc, 0x33, 0x80, 0x0, 0xe6, 0x67, 0x0,
    0x0, 0x71, 0x8e, 0x0, 0x0, 0x38, 0x1c, 0x0,
    0x0, 0x1e, 0x78, 0x0, 0x0, 0x7, 0xe0, 0x0,
    0x0, 0x3, 0xc0, 0x0,

    /* U+E612 "" */
    0x0, 0x3f, 0xc0, 0x0, 0xf, 0xff, 0x0, 0x3,
    0xf0, 0xfc, 0x0, 0x78, 0x61, 0xe0, 0xe, 0x3f,
    0xc7, 0x1, 0xcf, 0xff, 0x38, 0x39, 0xff, 0xf9,
    0xc3, 0x3f, 0xff, 0xcc, 0x67, 0xff, 0xfe, 0xe6,
    0x7f, 0xfd, 0xe6, 0xef, 0xff, 0xbf, 0x7c, 0xff,
    0xf7, 0xf7, 0xcf, 0xfe, 0xff, 0x3d, 0xff, 0x9f,
    0xfb, 0xdf, 0xf9, 0xff, 0xbc, 0xff, 0xcf, 0xf3,
    0xcf, 0xfe, 0x7f, 0x7c, 0xff, 0xf3, 0xf7, 0x67,
    0xff, 0xbe, 0x66, 0x7f, 0xfd, 0xee, 0x33, 0xff,
    0xec, 0xc3, 0x9f, 0xff, 0x9c, 0x18, 0xff, 0xf3,
    0x80, 0xe3, 0xfc, 0x70, 0x7, 0x6, 0xe, 0x0,
    0x3c, 0x7, 0xc0, 0x0, 0xff, 0xf0, 0x0, 0x3,
    0xfc, 0x0,

    /* U+E613 "" */
    0x3, 0xc0, 0x1f, 0x0, 0xf, 0x0, 0x7c, 0xf,
    0x0, 0xf8, 0x3, 0xfc, 0x3, 0xe0, 0xf, 0xff,
    0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
    0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xf0, 0x0,
    0x0, 0x3f, 0xc0, 0x0, 0x0, 0xff, 0x3c, 0xf9,
    0xf3, 0xfc, 0xf3, 0xe7, 0xcf, 0xf3, 0xcf, 0x9f,
    0x3f, 0xcf, 0x3e, 0x7c, 0xff, 0x3c, 0xf9, 0xf3,
    0xfc, 0x0, 0x0, 0xf, 0xf0, 0x0, 0x0, 0x3f,
    0xcf, 0x3e, 0x0, 0xff, 0x3c, 0xf8, 0x3, 0xfc,
    0xf3, 0xe0, 0xf, 0xf3, 0xcf, 0x80, 0x3f, 0xcf,
    0x3e, 0x0, 0xff, 0x0, 0x0, 0x3, 0xfc, 0x0,
    0x0, 0xf, 0xf0, 0x0, 0x0, 0x3f, 0xc0, 0x0,
    0x0, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
    0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
    0xf0,

    /* U+E614 "" */
    0x0, 0x0, 0x1, 0x0, 0x0, 0x0, 0x3, 0x80,
    0x0, 0x0, 0x6, 0xc0, 0x0, 0x0, 0xc, 0x60,
    0x0, 0x0, 0x18, 0x30, 0x0, 0x0, 0x30, 0x18,
    0x0, 0x0, 0x60, 0xc, 0x0, 0x0, 0xc2, 0x1c,
    0x0, 0x1, 0x83, 0x38, 0x0, 0x3, 0x1, 0xf0,
    0x0, 0x6, 0x0, 0xe0, 0x0, 0xc, 0xc, 0xc0,
    0x0, 0x18, 0x67, 0x80, 0x0, 0x30, 0x33, 0x0,
    0x0, 0x60, 0x1e, 0x0, 0x0, 0xc0, 0xdc, 0x0,
    0x1, 0x84, 0x78, 0x0, 0x3, 0x6, 0x70, 0x0,
    0x6, 0x3, 0xe0, 0x0, 0xc, 0x9, 0xc0, 0x0,
    0x18, 0xd, 0x80, 0x0, 0x30, 0xc7, 0x0, 0x0,
    0x60, 0x66, 0x0, 0x0, 0xc0, 0x3c, 0x0, 0x0,
    0x61, 0x98, 0x0, 0x0, 0x30, 0xfc, 0x0, 0x0,
    0x18, 0xe6, 0x0, 0x0, 0xc, 0xc6, 0x0, 0x0,
    0x7f, 0xff, 0xff, 0xfe, 0xff, 0xff, 0xff, 0xff,
    0xff, 0xff, 0xff, 0xff, 0x7f, 0xff, 0xff, 0xfe,

    /* U+E615 "" */
    0x0, 0x3f, 0x80, 0x0, 0x18, 0x1c, 0x0, 0xc,
    0x0, 0xc0, 0x3, 0x0, 0x6, 0x0, 0xc0, 0x0,
    0x40, 0x18, 0x0, 0xc, 0x6, 0x3, 0x80, 0x80,
    0xc1, 0xfc, 0x18, 0x10, 0x31, 0x83, 0x2, 0x4,
    0x10, 0x60, 0x40, 0x86, 0xc, 0x8, 0x18, 0xc1,
    0x81, 0x83, 0xf8, 0x30, 0x30, 0x1c, 0x6, 0x3,
    0x0, 0x1, 0x80, 0x60, 0x0, 0x30, 0x6, 0x0,
    0xc, 0x0, 0xe0, 0x3, 0x0, 0xe, 0x0, 0xe0,
    0x0, 0xe0, 0x38, 0x0, 0xe, 0xe, 0x40, 0x78,
    0xe3, 0x9f, 0x3c, 0x7, 0xc0, 0x7e, 0x0, 0x70,
    0x3, 0xe0, 0x0, 0x0, 0xef, 0xc0, 0x1, 0xf8,
    0x7f, 0xff, 0xfc, 0x0, 0xff, 0xf8, 0x0,

    /* U+E618 "" */
    0x0, 0x1e, 0x0, 0x0, 0x1f, 0xe0, 0x0, 0xf,
    0xfc, 0x0, 0xf, 0x87, 0xc0, 0xf, 0xc0, 0xfc,
    0xf, 0xc0, 0xf, 0xc7, 0xc0, 0x0, 0xfb, 0xe0,
    0x0, 0x1f, 0xe0, 0x0, 0x1, 0xf8, 0x7, 0xc0,
    0x7e, 0x3, 0xf8, 0x1f, 0x81, 0xc7, 0x7, 0xe0,
    0xe0, 0xe1, 0xf8, 0x38, 0x38, 0x7e, 0xe, 0xe,
    0x1f, 0x83, 0x83, 0x87, 0xe0, 0x71, 0xc1, 0xf8,
    0xf, 0xe0, 0x7e, 0x1, 0xf0, 0x1f, 0x80, 0x0,
    0x7, 0xf8, 0x0, 0x7, 0xdf, 0x0, 0x3, 0xe3,
    0xf0, 0x3, 0xf0, 0x3f, 0x1, 0xf0, 0x3, 0xf1,
    0xf0, 0x0, 0x3f, 0xf0, 0x0, 0x7, 0xf8, 0x0,
    0x0, 0x78, 0x0
};


/*---------------------
 *  GLYPH DESCRIPTION
 *--------------------*/

static const lv_font_fmt_txt_glyph_dsc_t glyph_dsc[] = {
    {.bitmap_index = 0, .adv_w = 0, .box_w = 0, .box_h = 0, .ofs_x = 0, .ofs_y = 0} /* id = 0 reserved */,
    {.bitmap_index = 0, .adv_w = 512, .box_w = 32, .box_h = 27, .ofs_x = 0, .ofs_y = -1},
    {.bitmap_index = 108, .adv_w = 512, .box_w = 28, .box_h = 28, .ofs_x = 2, .ofs_y = -2},
    {.bitmap_index = 206, .adv_w = 512, .box_w = 30, .box_h = 30, .ofs_x = 1, .ofs_y = -3},
    {.bitmap_index = 319, .adv_w = 512, .box_w = 32, .box_h = 32, .ofs_x = 0, .ofs_y = -4},
    {.bitmap_index = 447, .adv_w = 512, .box_w = 27, .box_h = 28, .ofs_x = 3, .ofs_y = -2},
    {.bitmap_index = 542, .adv_w = 512, .box_w = 26, .box_h = 28, .ofs_x = 3, .ofs_y = -2}
};

/*---------------------
 *  CHARACTER MAPPING
 *--------------------*/

static const uint8_t glyph_id_ofs_list_0[] = {
    0, 1, 2, 3, 4, 0, 0, 5
};

/*Collect the unicode lists and glyph_id offsets*/
static const lv_font_fmt_txt_cmap_t cmaps[] =
{
    {
        .range_start = 58897, .range_length = 8, .glyph_id_start = 1,
        .unicode_list = NULL, .glyph_id_ofs_list = glyph_id_ofs_list_0, .list_length = 8, .type = LV_FONT_FMT_TXT_CMAP_FORMAT0_FULL
    }
};



/*--------------------
 *  ALL CUSTOM DATA
 *--------------------*/

#if LVGL_VERSION_MAJOR >= 8
/*Store all the custom data of the font*/
static  lv_font_fmt_txt_glyph_cache_t cache;
static const lv_font_fmt_txt_dsc_t font_dsc = {
#else
static lv_font_fmt_txt_dsc_t font_dsc = {
#endif
    .glyph_bitmap = glyph_bitmap,
    .glyph_dsc = glyph_dsc,
    .cmaps = cmaps,
    .kern_dsc = NULL,
    .kern_scale = 0,
    .cmap_num = 1,
    .bpp = 1,
    .kern_classes = 0,
    .bitmap_format = 0,
#if LVGL_VERSION_MAJOR >= 8
    .cache = &cache
#endif
};


/*-----------------
 *  PUBLIC FONT
 *----------------*/

/*Initialize a public general font descriptor*/
#if LVGL_VERSION_MAJOR >= 8
const lv_font_t lv_custom_icon = {
#else
lv_font_t lv_custom_icon = {
#endif
    .get_glyph_dsc = lv_font_get_glyph_dsc_fmt_txt,    /*Function pointer to get glyph's data*/
    .get_glyph_bitmap = lv_font_get_bitmap_fmt_txt,    /*Function pointer to get glyph's bitmap*/
    .line_height = 32,          /*The maximum line height required by the font*/
    .base_line = 4,             /*Baseline measured from the bottom of the line*/
#if !(LVGL_VERSION_MAJOR == 6 && LVGL_VERSION_MINOR == 0)
    .subpx = LV_FONT_SUBPX_NONE,
#endif
#if LV_VERSION_CHECK(7, 4, 0) || LVGL_VERSION_MAJOR >= 8
    .underline_position = 0,
    .underline_thickness = 0,
#endif
    .dsc = &font_dsc,          /*The custom font data. Will be accessed by `get_glyph_bitmap/dsc` */
    .fallback = NULL,
    .user_data = NULL
};



#endif /*#if LV_CUSTOM_ICON*/

